package com.btpj.jetpack.arouter.webview

import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Autowired
import com.alibaba.android.arouter.launcher.ARouter
import com.btpj.jetpack.arouter.ConstantsPath

class WebViewServiceImpWrap private constructor() {

    @Autowired(name = ConstantsPath.WEB_VIEW_SERVICE_PATH)
    lateinit var service: WebViewService

    init {
        ARouter.getInstance().inject(this)
    }

    companion object {
        val instance =
            Singleton.holder

        object Singleton {
            val holder = WebViewServiceImpWrap()
        }
    }

    fun start(context: Context, title: String, url: String) {
        service.start(context, title, url)
    }
}